<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    let URL = "http://www.baidu.com?name=elephant&age=25&sex=male&num=100"
    function queryURLParams(URL) {
        let url = URL.split("?")[1].split("&");
        let obj = {};
        for (let i = 0; i < url.length; i++) {
            let arr = url[i].split("=")
            obj[arr[0]] = arr[1]
        }
        return obj
    }
    console.log(queryURLParams(URL))


    function Accumulation(...vals) {
        return vals.reduce((t, v) => t + v, 0);
    }

    function Multiplication(...vals) {
        return vals.reduce((t, v) => t * v, 1);
    }

    // console.log(Accumulation(arr));
    // console.log(Multiplication(arr));

</script>

</html>